<%inherit file="base.html"/>

<%def name="main_panel()">
<div class="block wide-block">
    <form id="prefs-form" action="/settings/" method="post">
        <ul>
            <li>
            % if prefs['notify_sync'] == 'on':
            <input type="checkbox" name="notify_sync" checked="checked" />
            % else:
            <input type="checkbox" name="notify_sync" />
            % endif
            ${_("Notify when libraries are synchronized")}
            </li>
            <li>
            % if prefs['auto_start'] == 'on':
            <input type="checkbox" name="auto_start" checked="checked" /> 
            % else:
            <input type="checkbox" name="auto_start" /> 
            % endif
            ${_("Auto start Seafile on system startup (only for Windows)")}
            </li>
            <li>
            % if prefs['encrypt_channel'] == 'on':
            <input type="checkbox" name="encrypt_channel" checked="checked" /> 
            % else:
            <input type="checkbox" name="encrypt_channel" /> 
            % endif
            ${_("Enable encryption for data transfer (restart Seafile to take effect)")}
            </li>
            <li>
            <label class="speed-set">${_("Upload speed limit:")}</label>
		    % if prefs['upload_limit'] > 0:
		    <input class="speed-input" type="text" name="upload_limit" value="${prefs['upload_limit']}" maxlength="20">
		    % else:
		    <input class="speed-input" type="text" name="upload_limit" maxlength="20">
		    % endif
            KB
	    </li>
	    <li>
		    <label class="speed-set">${_("Download speed limit:")}</label>
		    % if prefs['download_limit'] > 0:
		    <input class="speed-input" type="text" name="download_limit" value="${prefs['download_limit']}" maxlength="20">
		    % else:
		    <input class="speed-input" type="text" name="download_limit" maxlength="20">
		    % endif
            KB
	    </li>
        </ul>
        % if error_msg:
        <p class="error">${error_msg}</p>
        % endif
        <input type="submit" value="${_("Submit")}" class="setting-submit" />
    </form>
</div>
</%def>
